package com.yun.config;

import com.yun.bean.School;
import com.yun.bean.Student;
import com.yun.bean.Teacher;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: fxy
 * @Date: 2022/08/31/16:29
 * @Description:
 */
@Configuration//(proxyBeanMethods = false)
public class YunConfig {
	@Bean("student")
	public Student getStudent(){
		return new Student();
	}

	@Bean("teacher")
	public Teacher getTeacher(){
		return new Teacher(getStudent());
	}

	@Bean("school")
	public School getSchool(){
		return new School(getTeacher());
	}
}
